﻿@model DictionaryEntity
<form class="form form-horizontal" asp-controller="Plus" asp-action="ChoicesetManage" method="post">
	<div class="row cl">
		<label class="form-label col-xs-3 col-sm-2">
			<ul id="ulNavList" class="Huifold">
				<li class="item">
					<h4>联系人信息表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Contacter&FieldName=Income">月收入</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Contacter&FieldName=Education">学历</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>客户联系记录表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ClientLog&FieldName=RelationType">联系方式</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>客户信息表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=Area">客户区域</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=ClientField">所属行业</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=ValueLevel">价值评估</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=CreditLevel">信用等级</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=Importance">重要程度</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=ConnectionLevel">关系等级</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=GroupID">客户组别</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=SourceType">客户来源</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Client&FieldName=PhaseType">客户阶段</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>公司信息表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Company&FieldName=StatusInField">行业地位</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Company&FieldName=CompanySize">公司规模</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Company&FieldName=ManagementForms">经营状态</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>服务记录表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ServiceLog&FieldName=ServiceType">服务类型</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ServiceLog&FieldName=ServiceMode">服务方式</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ServiceLog&FieldName=TakeTime">花费时间</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ServiceLog&FieldName=Result">服务结果</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ServiceLog&FieldName=ConfirmScore">客户评价</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>投诉记录表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ComplainLog&FieldName=ComplainType">服务类型</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ComplainLog&FieldName=ComplainMode">服务方式</a></li>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=ComplainLog&FieldName=ExigenceLevel">紧急程度</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>订单表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Orders&FieldName=OrderType">订单类型</a></li>
						</ul>
					</div>
				</li>
				<li class="item">
					<h4>作者表<b>+</b></h4>
					<div class="info" style="display:block;">
						<ul>
							<li><a href="/Admin/Plus/ChoicesetManage?TableName=Author&FieldName=Type">作者类型</a></li>
						</ul>
					</div>
				</li>
			</ul>
		</label>
		<div class="formControls col-xs-9 col-sm-10">
			<div class="cl pd-5 bg-1 bk-gray">
				<span class="l">
					数据字典管理 >> @Model.Title
				</span>
			</div>
			<table class="table table-border table-bordered table-bg table-hover mt-20">
				<thead>
					<tr class="text-c">
						<th width="20%">序号</th>
						<th width="20%">默认</th>
						<th width="20%">启用</th>
						<th width="40%">选项值</th>
					</tr>
				</thead>
				<tbody id="tableBody">
					@{
						var arrValue = Model.FieldValue.Split('$', StringSplitOptions.RemoveEmptyEntries);
						for (var i = 0; i < arrValue.Length + 3; i++)
						{
							var chkID = "chk" + i;
							var txtID = "txt" + i;
							var num = i + 1;
							var arrItemValue = new string[3] { string.Empty, string.Empty, string.Empty };
							if (i < arrValue.Length)
							{
								arrItemValue = arrValue[i].Split('|', StringSplitOptions.RemoveEmptyEntries);
							}
							var txtValue = DataConverter.ToString(arrItemValue[0]);
							var chkValue = DataConverter.CLng(arrItemValue[1]);
							var radValue = DataConverter.CLng(arrItemValue[2]);
							<tr class="text-c">
								<td>@num</td>
								<td>
									@if (radValue == 1)
									{
										<input type="radio" name="rad" value="@i" checked="checked" />
									}
									else
									{
										<input type="radio" name="rad" value="@i" />
									}
								</td>
								<td>
									@if (chkValue == 1)
									{
										<input type="checkbox" name="@chkID" id="@chkID" checked="checked" />
									}
									else
									{
										<input type="checkbox" name="@chkID" id="@chkID" />
									}
								</td>
								<td><input type="text" class="input-text" name="@txtID" id="@txtID" value="@txtValue" /></td>
							</tr>
						}
					}
				</tbody>
			</table>
			<div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
				<button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button class="btn btn-default radius" type="button" onClick="removeIframe();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
				<input type="hidden" asp-for="FieldID" />
				<input type="hidden" asp-for="TableName" />
				<input type="hidden" asp-for="FieldName" />
			</div>
		</div>
	</div>
	@Html.AntiForgeryToken()
</form>

@section scripts{
	<script type="text/javascript">

		$(function () {
			$.Huifold("#ulNavList .item h4", "#ulNavList .item .info", "fast", 3, "click");
		});
	</script>
}